<?php
/**
 * Created by JetBrains PhpStorm.
 * User: zhouyang
 * Date: 13-9-06
 * Time: 下午4:31
 * To change this template use File | Settings | File Templates.
 */
class SummarysModel extends Model{
    //根据summary_id 获取summary 信息
    public function get($summary_id){
		return $this->dbreader()->get($summary_id);
    }

    //根据title 获取summary 信息
    public function getSummaryInfoByTitle($title){
		return $this->dbreader()->getSummaryInfoByTitle($title);
    }

    //获取摘要 列表<带分页>
    public function getSummaryList($curr_page,$per_page,$filter = array()){
        return $this->dbreader()->getSummaryList($curr_page,$per_page,$filter);
    }

    //添加资讯摘要信息
    public function addSummary($source_id, $title, $status = 1, $summary, $content, $url, $user_id, $published = null, $update_time = null){
        return $this->dbreader()->addSummary($source_id, $title, $status = 1, $summary, $content, $url, $user_id, $published, $update_time);
    }

    //删除摘要信息
    public function delSummary($summary_id){
		return $this->dbreader()->delSummary($summary_id);
    }

    //添加资讯摘要信息
    public function editSummary($summary_id, $source_id, $title, $status = 1, $summary, $content, $url){
        return $this->dbreader()->editSummary($summary_id, $source_id, $title, $status = 1, $summary, $content, $url);
    }

    //推荐资讯摘要
    public function recommendSummary($summary_id,$status){
        return $this->dbreader()->recommendSummary($summary_id,$status);
    }
}